package com.device.operating.dao;

import java.util.List;

import org.springframework.data.repository.PagingAndSortingRepository;

import com.device.operating.entity.Ugfunc;

public interface UgfuncRepository extends PagingAndSortingRepository<Ugfunc, String>{	
	/**
	 * 查询小组或者人员的所有功能权限
	 * @param ugtype
	 * @param ugId
	 * @return
	 */
	public List<Ugfunc> findByUgtypeAndUgId(String ugtype,String ugId);
	/**
	 * 查询当前分组或者人员是否有操作该功能的权限
	 * @param ugtype
	 * @param ugId
	 * @param funcId
	 * @return
	 */
	public Ugfunc findByUgtypeAndUgIdAndFuncId(String ugtype,String ugId,String funcId);
	
	public Ugfunc findByUgtypeAndUgIdAndFunccode(String ugtype,String ugId,String funccode);
	
	public List<Ugfunc> findByUgId(String ugId);
}
